package org.nico.ratel.landlords.entity;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentSkipListMap;

import lombok.Data;
import org.nico.ratel.landlords.enums.RoomStatus;
import org.nico.ratel.landlords.enums.RoomType;
//房间信息
@Data
public class Room{
	//房间号
	private int id;
	//房主
	private String roomOwner;
	//房间状态（空闲-等待-开始）
	private RoomStatus status;
	//房间类型
	private RoomType type;
	//客户端id-object
	private Map<Integer, ClientSide> clientSideMap;
	//客户端链表
	private LinkedList<ClientSide> clientSideList;
	//房主id
	private int landlordId = -1;
	//房间底牌
	private List<Poker> landlordPokers;
	//最后出的扑克牌
	private PokerSell lastPokerShell;
	//最后出牌客户端
	private int lastSellClient = -1;
	//当前出牌客户端
	private int currentSellClient = -1;
	//难度系数
	private int difficultyCoefficient;
	//最后洗牌时间
	private long lastFlushTime;
	//创建时间
	private long createTime;
	//第一个出牌客户端
	private int firstSellClient;
	
	public Room() {
	}

	public Room(int id) {
		this.id = id;
		this.clientSideMap = new ConcurrentSkipListMap<>();
		this.clientSideList = new LinkedList<>();
		this.status = RoomStatus.BLANK;
	}

}
